	list      p=16F88           ; list directive to define processor
	#include <p16f88.inc>        ; processor specific variable definitions
;	errorlevel  -302              ; suppress message 302 from list file


	__CONFIG    _CONFIG1, _CP_OFF & _CCP1_RB0 & _DEBUG_OFF & _WRT_PROTECT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _MCLR_OFF & _PWRTE_ON & _WDT_ON & _INTRC_IO
	__CONFIG    _CONFIG2, _IESO_OFF & _FCMEN_OFF

var_main    UDATA_SHR
WREGsave    res 1
STATUSsave  res 1
FSRsave     res 1
PCLATHsave  res 1

STARTUP	CODE
  goto  startup
  nop
  nop
  nop
  goto  ISR

sec_main  CODE

;====================
ISR
;====================
  banksel INTCON
  bcf   INTCON,7

  movwf	WREGsave
  movf	STATUS,W
  movwf	STATUSsave
  movf	PCLATH,W
  movwf	PCLATHsave
  movf	FSR,W
  movwf	FSRsave
;--------------------
; put ISR here


;--------------------
ISR_END
  movf	FSRsave,W
  movwf	FSR
  movf	PCLATHsave,W
  movwf	PCLATH
  movf	STATUSsave,W
  movwf	STATUS
  swapf	WREGsave,F
  swapf	WREGsave,W
  
  banksel INTCON
  bsf   INTCON,7
  retfie
;--------------------

;====================
startup
;====================
  goto main
;--------------------
  
;====================
main
;====================
  goto main
;--------------------
end
